package cn.com.scitc.pano.controller;

import cn.com.scitc.pano.dao.UserDao;
import cn.com.scitc.pano.domain.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;


@Controller
public class AdminController {
    private @Autowired
    UserDao userDao;

    @GetMapping("/user")
    private String user(Model model){
        Iterable<User> list = userDao.findAll();
        model.addAttribute("list",list);

        return "user";
    }
}
